package com.ruoyi.core.mapper;

import com.ruoyi.core.domain.ClientUserProductRelation;
import com.ruoyi.core.domain.custombean.ClientUserListQueryResult;
import com.ruoyi.core.domain.custombean.ClientUserProductRelationMoreInfo;
import com.ruoyi.core.domain.custombean.ClientUserProductUsageRightQueryResult;
import com.ruoyi.core.domain.custombean.ClientUserQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ClientUserProductRelationMapper {

    int batchInsert(List<ClientUserProductRelation> clientUserProductRelations);

    int update(ClientUserProductRelation clientUserProductRelation);

    List<ClientUserProductRelation> findByUserId(Long userId);


    List<ClientUserListQueryResult> findAllClientUser(ClientUserQuery clientUserQuery);


    List<ClientUserListQueryResult> findClientUserByIdSet(Long[] ids);

    ClientUserProductRelation findByUserIdAndProductId(@Param("userId") Long userId, @Param("productId") Long productId);

    int deleteByUserIdAndProductId(@Param("userId") Long userId, @Param("productId") Long productId);

    List<ClientUserProductUsageRightQueryResult> findClientProductByClientUserId(Long clientUserId);

    int deleteByProductIdSet(Long[] ids);

    List<ClientUserProductRelationMoreInfo> findAllProductPermissionByUserId(Long userId);
}
